<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body th:fragment="tooth_function">
<div class="wonderful-top">

    <div class="top-list top-list-one">
        <div id="fun_xzx" th:onclick="mytext('zx')">
            <a class="write-artical" href="javascript:;" target="_self">
                <img src="/icon/icon_Questions.png" alt="有贝口腔网">
                <span>写文章</span>
            </a>
        </div>
        <div th:onclick="mytext('wd')">
            <a href="javascript:;" target="_self" id="qa">
                <img src="/icon/icon_Articles.png" alt="有贝口腔网">
                <span>提问题</span>
            </a>
        </div>
    </div>
    <div class="top-list top-list-two">
        <div>
            <a href="javascript:;" target="_self" onclick="showPlanFun()">
                <img src="/icon/Dentist.png" alt="有贝口腔网">
                <span>网上看牙</span>
            </a>
        </div>
        <div>
            <a href="http://www.hasbei.com/about/link" target="_blank">
                <img src="/icon/Factory.png" alt="有贝口腔网">
                <span>厂家入驻</span>
            </a>
        </div>
        <div>
            <a href="http://www.hasbei.com/about/link" target="_blank">
                <img src="/icon/Hospital.png" alt="有贝口腔网">
                <span>诊所入驻</span>
            </a>
        </div>
    </div>
</div>


    <div th:replace="common/hasbei_text"></div>


<script>
    function mytext(value) {
        $("#form-title").text("");

        if(value=="zx"){
            $("#form-title").attr("placeholder","请输入文章标题（5-100个汉字）")
            editor.txt.html('<p id="myplaceholder" style="color: #999">请输入相关口腔文章、资讯内容</p>')

            //$("#myplaceholder").text("请输入相关口腔文章、资讯内容")
            layer.open({
                title: "發表文章"
                , content: $('#mytext')
                , type: 1
                , area: ["auto", "auto"]
                , anim: 5
                , btn: ['yes', 'no']
                ,yes: function(index, layero){
                    //按钮【按钮一】的回调
                    alert(index+'a')
                    layer.closeAll(); //疯狂模式，关闭所有层
                }
                ,btn2: function(index, layero){
                    //按钮【按钮二】的回调
                    alert(index+'b')
                    //return false 开启该代码可禁止点击该按钮关闭
                }

            });
        }
        if(value=="wd"){
            $("#form-title").attr("placeholder","请输入口腔问题（5-100个汉字）以?号结尾")
            editor.txt.html('<p id="myplaceholder" style="color: #999">【非必填】，描述该口腔问题背景，如什么情况下产生这个问题</p>')

            layer.open({
                title: "發表口腔问题"
                , content: $('#mytext')
                , type: 1
                , area: ["auto", "auto"]
                , anim: 5
                , btn: ['yes', 'no']
                ,yes: function(index, layero){
                    //按钮【按钮一】的回调
                    alert(index+'a')
                    layer.closeAll(); //疯狂模式，关闭所有层
                }
                ,btn2: function(index, layero){
                    //按钮【按钮二】的回调
                    alert(index+'b')
                    //return false 开启该代码可禁止点击该按钮关闭
                }
            });
        }



    }
</script>

</body>
</html>